#pragma once
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
#define N 100 //便道车位最大数
#include "Car.h"
typedef struct {
    int front, rear;
    Car sidewalkCar[N];
    int max;
    int sum;
}SideWalk;//便道结构体
SideWalk* SideWalk_Create();//创建便道
void SideWalk_Free(SideWalk* sidewalk);//释放便道
void SideWalk_MakeEmpty(SideWalk* sidewalk);//便道置空
bool SideWalk_IsEmpty(SideWalk* sidewalk);//判断便道是否为空
bool SideWalk_IsFull(SideWalk* sidewalk);//判断便道是否为满
int SideWalk_Length(SideWalk* sidewalk);//计算便道车辆数,返回车辆数
bool SideWalk_Add(SideWalk* sidewalk, Car* car);//车辆进入便道
bool SideWalk_Leave(SideWalk* sidewalk, Car& car);//车辆离开便道
void SideWalk_Print(SideWalk* sidewalk);//查询便道上所有车辆,打印车辆信息
